//
//  Manager.h
//  Xmpp
//
//  Created by lanou3g on 16/1/28.
//  Copyright © 2016年 徐强. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPFramework.h"
@interface Manager : NSObject

///通讯管道
@property (nonatomic,strong)XMPPStream *stream;

///好友列表
@property (nonatomic,strong)XMPPRoster *rost;

//聊天消息存储
@property (nonatomic,strong)XMPPMessageArchiving *archiving;
//聊天消息有关的上下文
@property (nonatomic,strong)NSManagedObjectContext *context;

//单例方法
+ (instancetype)shareManage;

//注册
- (void)registWithUser:(NSString *)userName passWord:(NSString *)passWord success:(void(^)(id data))success fail:(void(^)(NSError *err))fail;
//登陆
- (void)loginWithUser:(NSString *)userName passWord:(NSString *)passWord success:(void(^)(id data))success fail:(void(^)(NSError *err))fail;
//注销
- (void)loginOut;
//添加好友
- (void)addFriendWith:(XMPPJID *)pjid;
//删除好友
- (void)removeFriendWith:(XMPPJID *)pjid;

@end
